#include "NamedPipe.hpp"

int main() {
    NamedPipe fifo(ComPath, NPCreater);
    // 让服务器不断地读
    while (true) {
        std::string message;
        int n = fifo.SomeoneUseToRead(&message);
        if (n == 0) {
            std::cout << "Client quit... Server too" << std::endl;
            break;
        }
        std::cout << "Client Say > " << message << std::endl;
        sleep(1);
    }
    return 0;
}